import Vue from 'vue'
import VueI18n from 'vue-i18n'
// import zhCN from '@yiducloud/yidu-ui/lib/locale/lang/zh-CN'
import zhLocale from 'element-ui/lib/locale/lang/zh-CN'

// import _ from 'lodash-es'

Vue.use(VueI18n)

export const i18n = new VueI18n({
    locale: 'zh-CN',
    fallbackLocale:'zh-CN',
    messages: {
        // en: require('./lang/en.json'),
        'zh-CN': (() =>
            // const files = require.context('./', true, /zh\.json$/)
            // eslint-disable-next-line unicorn/no-array-reduce
             ({
                // ...zhCN,
                ...zhLocale
            })
        )(),
    },
})

// export default i18n
